<template>
	<view class="good-item" @click.stop="toDetail">
		<view class="good-item-img-wrap">
			<image class="" :src="baseImgUrl+detail.mainImage.imagePath" mode="aspectFill"></image>
		</view>
		<view class="u-p-20">
			<view class="u-font-28 u-flex-1 ellipsis">{{detail.name}}</view>
			<view class="color-green u-p-t-10 ">
				<text>￥</text>
				<text class="u-font-32">{{detail.price}}</text>
			</view>
		</view>
	</view>
</template>
<script setup>
	import {
		ref,
		computed,
		getCurrentInstance
	} from 'vue'
	const {
		proxy,
	} = getCurrentInstance()
	const {
		baseImgUrl
	} = proxy
	const {
		nav,
		navLogin,
	} = proxy.$util;
	const props = defineProps({
		detail: {
			type: Object,
			default: {},
		}

	})
	const toDetail = () => {
		let data = {
			sid: props.detail.sid
		};
		nav('/pagesSub/goodDetail/goodDetail', data)
	}
</script>

<style lang="scss" scoped>

</style>